<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>测试工具</title>
    <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
</head>
<body>
    <div class="nav navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header navbar-left">
                <a class="navbar-brand active" href="{{ url_for('auth.home') }}">首页</a>
            </div>
            {% if current_user.is_authenticated %}
            <div class="navbar-collapse navbar-left">
                <ul class="nav navbar-nav">
                    <li><a href="{{ url_for('cash_value.cash_value_ajax') }}">现价测试</a></li>
                    <li><a href="{{ url_for('record_policy.policy_record') }}">保单录入</a></li>
                    <li><a href="{{ url_for('create_photo.id_photo') }}">证件照</a></li>
                    <li><a href="{{ url_for('modify_db.db_modify') }}">数据修改</a></li>
                    <li><a href="{{ url_for('product_shelves.shelves_product') }}">产品上架</a></li>
                </ul>
            </div>
            <div class="navbar-collapse navbar-right">
                <ul class="nav navbar-nav">
                    <li><a>{{ current_user.username }}</a></li>
                    <li><a href="{{ url_for('auth.logout') }}">注销</a></li>
                </ul>
            </div>
            <div class="navbar-collapse navbar-right">
                <form method="POST" role="search" action="{{ url_for('catalog.product_search') }}">
                    <input type="search" class="form-control" placeholder="搜索产品..." aria-label="Search" name="content">
                </form>
            </div>
            {% else %}
            <div class="navbar-collapse navbar-right">
              <ul class="nav navbar-nav">
                  <li><a href="{{ url_for('auth.login') }}">登录</a></li>
                  <li><a href="{{ url_for('auth.register') }}">注册</a></li>
              </ul>
            </div>
            {% endif %}
        </div>
    </div>
    <div>
        {% for message in get_flashed_messages(with_categories=true) %}
        <div class="alert alert-{{auth}} alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            {{ message }}
        </div>
        {% endfor %}
    </div>
    <div class="container">
        {% block container %}{% endblock %}
    </div>
    <script src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
</body>
</html>